package com.medicine.hbp.adapter.self;

import com.medicine.hbp.base.MyBaseAdapter;
import com.medicine.hbp.mob.ShareInfoVo;
import com.medicine.hbp.R;

import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class SelfUserGxAdapter extends MyBaseAdapter {
	private LayoutInflater inflater;

	public SelfUserGxAdapter(Activity activity) {
		this.activity=activity;
		inflater = LayoutInflater.from(activity);
	}

	@Override
	public View getView(int position, View view, ViewGroup arg2) {
		ViewHolder viewHolder;
		if (view == null) {
			viewHolder=new ViewHolder();
			view = inflater.inflate(R.layout.item_gx, null);
			viewHolder.text_time=(TextView) view.findViewById(R.id.text_time);
			viewHolder.text_detail=(TextView) view.findViewById(R.id.text_detail);
			view.setTag(viewHolder);
		}else{
			viewHolder=(ViewHolder) view.getTag();
		}
		ShareInfoVo infoVo=(ShareInfoVo) getItem(position);
		if(infoVo!=null){
			viewHolder.text_time.setText("这里是时间");
			viewHolder.text_detail.setText(infoVo.shareMsg);
		}
		return view;
	}

	class ViewHolder {
		TextView text_time;
		TextView text_detail;
	}
}
